from dingtalkchatbot.chatbot import DingtalkChatbot
from django.conf import settings

def send(message,at_mobiles=[]):
    # 引用settings里的钉钉群消息通知webhook地址
    webhook = settings.DINGTALK_WEB_HOOK
    # 初始化机器人，
    xiaojin=DingtalkChatbot(webhook)
    # 勾选加签选项时使用，
    # xiaojin=DingtalkChatbot(webhook,secret=secret)
    # Text消息给谁
    xiaojin.send_text(msg=f"面试通知： {message}",at_mobiles=at_mobiles)
